package com.ruoyi.central.domain;

import com.ruoyi.common.enums.common.State;
import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.validation.group.InsertGroup;
import com.ruoyi.common.validation.group.UpdateGroup;
import lombok.Data;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Length;

import javax.validation.constraints.NotNull;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 操作站点-物料对象 top_central_operation_station_material
 *
 * @author SunLuQuan
 * @date 2022-04-25
 */
@Data
@TableName("top_central_operation_station_material")
public class TopCentralOperationStationMaterial extends BaseEntity{

    private static final long serialVersionUID = 1L;

    public TopCentralOperationStationMaterial() {
    }

    public TopCentralOperationStationMaterial(@NotNull(groups = {InsertGroup.class, UpdateGroup.class}, message = "执行工序编号不能为空") @Length(min = 0,max =  10, message = "执行工序编号 数据长度不能大于 10") String materialId, @NotNull(groups = {InsertGroup.class, UpdateGroup.class}, message = "站位编号不能为空") @Length(min = 0,max =  10, message = "站位编号 数据长度不能大于 10") Integer operationStationId) {
        this.materialId = materialId;
        this.operationStationId = operationStationId;
    }

    /** 编号 */
    @TableId
    @Length(min = 0,max = 10,message="编号 数据长度不能大于 10")
    private Integer id;

    /** 物料编号 */
    @Excel(name = "物料编号")
    @NotNull(groups = {InsertGroup.class,UpdateGroup.class},message = "物料编号不能为空")
    @Length(min = 0,max = 50,message="物料编号 数据长度不能大于 50")
    private String materialId;

    /** 站位编号 */
    @Excel(name = "站位编号")
    @NotNull(groups = {InsertGroup.class,UpdateGroup.class},message = "站位编号不能为空")
    @Length(min = 0,max = 10,message="站位编号 数据长度不能大于 10")
    private Integer operationStationId;

    /**物料对象**/
    @TableField(exist = false)
    private TopCentralMaterial material;

    /**操作工位对象**/
    @TableField(exist = false)
    private TopCentralOperationStation operationStation;

/**表中没有的字段*/
    @TableField(exist = false)
    private Integer weight;

    @TableField(exist = false)
    private Date updateTime;

    @TableField(exist = false)
    private State state;

}
